<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{&blog_name} &rsaquo; Log in - Powered by nblog</title>
<link href="__PUBLIC__/Css/g.css" rel="stylesheet" type="text/css" />
<load href="__PUBLIC__/Js/jquery-1.4.4.min.js" />
<load href="__PUBLIC__/Js/Base.js" />
<load href="__PUBLIC__/Js/Ajax/ThinkAjax.js" />
<script type="text/javascript">
<!--
ThinkAjax.image = ['__PUBLIC__/Images/loading.gif','','__PUBLIC__/Images/warn.gif']
ThinkAjax.updateTip	= 'Loading...';

function loginHandle(data,status) {
	if (status==1) {
	    var content = '<span style="color:blue">Login Successful</span>';
		$('#result').html(content);
		window.location = '__URL__';
	}
}

function keydown(e){
	var e = e || event;
	if (e.keyCode==13) {
		ThinkAjax.sendForm('loginForm','__URL__/checkLogin/',loginHandle,'result');
	}
}

function fleshVerify() {
	var timenow = new Date().getTime();
	//document.getElementById('verifyImg').src= '__URL__/verify/'+timenow;
	$('#verifyImg').attr('src', '__URL__/verify/'+timenow);
}
//-->
</script>
</head>

<body>
<div id="login">
  <fieldset>
  <legend>{&blog_name}</legend>
  <form action="__URL__/checkLogin" method="post" id="loginForm" >
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td align="center" colspan="2" height="30px;"><div id="result"></div></td>
      </tr>
      <tr>
        <td align="right" width="32%">Username:</td>
        <td width="68%"><input name="user_name" type="text" size="30" class="text"/></td>
      </tr>
      <tr>
        <td align="right">Password:</td>
        <td><input name="user_password" type="password" size="30" class="text"/></td>
      </tr>
      <tr>
        <td align="right">Code:</td>
        <td><input name="verify" type="text" id="verify" size="4" maxlength="4" class="text" onKeyDown="keydown(event)"/>
          <img id="verifyImg" src="__URL__/verify/" title="Request a new picture" style="cursor:pointer;" border="0" align="left" onclick="javascript:fleshVerify()"> &nbsp;</td>
      </tr>
      <tr>
        <td align="center"  colspan="2"><input type="hidden" name="ajax" value="1"><input type="button" name="submit" value="Log in" class="submit" id="cmt-submit" onclick="ThinkAjax.sendForm('loginForm','__URL__/checkLogin/',loginHandle,'result');" /></td>
      </tr>
    </table>
  </form>
  </fieldset>
</div>
</body>
</html>